<?php
class System_Tools {
	
	public static function arrayToObject($array) {
		$object = new stdClass;
		foreach ($array as $key => $item) {
			if (is_array($item)) {
				$object->$key = self::arrayToObject($item);
			} else {
				$object->$key = $item;
			}
		}
		return $object;
	}
	
}